<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=no, maximum-scale=1.0"/>
    <title>充值</title>
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta content="telephone=no" name="format-detection" />
    <link href="../assets/mobile/comm.css" rel="stylesheet" type="text/css" />
    <link href="../assets/mobile/member.css?v=130726" rel="stylesheet" type="text/css" />
    <link href="../assets/mobile/invite.css?v=130726" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" href="../assets/mobile/top.css">
<link rel="stylesheet" href="../assets/agile/css/ratchet/css/ratchet.min.css">
<link rel="stylesheet" href="../assets/agile/css/flat/flat.component.css">
<link rel="stylesheet" href="../assets/agile/css/flat/iconline.css">
<link rel="stylesheet" href="../assets/app/css/app.css" />
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/jquery.js"></script>
<script type="text/javascript" src="../script/jquery.form.js"></script>
<script type="text/javascript" src="../script/config.js"></script>
<script type="text/javascript" src="../script/local.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<style>.R-content .total{line-height:20px;}.Apply-con dl{margin-top:0px;}</style>
</head>
<body>
<div class="h5-1yyg-v11">
<!--通用顶部-->

<!--通用顶部结束-->

	<div id="wrapper" style="position:static !important;">
    	<section class="clearfix g-member" style="margin-top:0px !important;"> 
        <div class="clearfix m-round m-name">
<div class="fl f-Himg">
                <a href="javascript:;" class="z-Himg">
                    <img data-original="" class="lazy" border=0/></a>
                <!-- <span class="z-class-icon01 gray02"><s></s>{wc:$member['yungoudj']}</span> -->
            </div>
            <div class="m-name-info"><p class="u-name">
                <b class="z-name gray01 uusername"></b><em class="umobile">(加载中)</em></p>
                <ul class="clearfix u-mbr-info"><li>可用云积分 <span class="orange uscore">加载中</span></li>
                    <!-- <li>经验值 <span class="orange"></span></li> -->
                    <li>余额 <span class="orange umoney">￥0.00</span></li>
                </ul>
            </div>
        </div>
        <div class="R-content">
            <div class="subMenu">
                <a id="linkApply">提现申请</a>
                <a id="linkRecharge" class="current">充值到抢购账户</a>
            </div>

            <div class="total">
                <dt>
                </dt><dd>佣金总余额：<b class="orange utotal">加载中</b>元</dd>
				<dd>活动佣金：<b class="orange cashouthdtotal">加载中</b>元</dd>
				<dd>正在佣金提现审核（冻结）：<b class="orange cashoutdjtotal">加载中</b>元</dd>
            </div>
   
            <div id="divSQCZ" class="Apply-con">
                <form name="form2" action="" method="post">
                    <dl>
                        <dt>当前可充值：</dt>
                        <dd><span id="spanBrokerage2" class="orange cashouthdtotal">加载中</span> 元 <span class="gray02">当佣金余额满1元即可充值</span></dd>
                    </dl>
                    <dl>
                        <dt>充值金额：</dt>
                        <dd><input id="txtCZMoney" style="width:80px;" name="txtCZMoney" type="text" onkeyup="value=value.replace(/\D/g,'')" class="inp-money txtAri" value="" tip="请输入充值金额"/><b>元</b>&nbsp;<span class="gray02" id="tip7">以整数为单位提取</span></dd>
                    </dl>

                    <div class="Apply-button">
                        <input type="submit" name="submit2" id="btnSQCZ" style="width:80%;margin:0 auto;" class="common-btn" title="充值" value="充值">
                    </div>
                </form>
            </div>
        </div>
    </section>
   </div>
</div>
<script type="text/javascript">
apiready = function(){

	$(function(){
		
		if(getUserinfo()){
			var userinfo = getUserinfo();
			GetJPData(config.url+'/app.php?act=cashout&uid='+userinfo.uid,{},function(data){
				if(data['status']){
					$('.z-Himg img').attr('data-original',config.upload_url+'/'+data['thumb']);
					$('.uusername').text(data['username']);
					$('.umobile').text('('+data['mobile']+')');
					$('.umoney').text('￥'+data['money']);
					$('.uscore').text(data['score']);
					$('.shourutotal').text(data['shourutotal']);
					$('.zhichutotal').text(data['zhichutotal']);
					$('.utotal').text(data['utotal']);
					$('.cashouthdtotal').text(data['cashouthdtotal']);
					$('.cashoutdjtotal').text(data['cashoutdjtotal']);
					lyzimg();
				}else{
					api.alert({msg:data['msg']});
				}
			});
		
		
		/**
		 $(".subMenu a").click(function(){
	          var id=$(".subMenu a").index(this);
	          $(".subMenu a").removeClass().eq(id).addClass("current");
	          $(".R-content .topic").hide().eq(id).show();
	      });
		*/

	      $("#linkApply").click(function(){
	          /*$("#divSQTX").show();
	          $("#divTip").show();
	          $("#divSQCZ").hide();*/
	          randomSwitchBtn('cashout',api);
	      });
	      $("#linkRecharge").click(function(){
	          /*
	          $("#divSQTX").hide();
	          $("#divTip").hide();
	          $("#divSQCZ").show();
	          */
	      });

	      function trim(s){
	          if(s.length>0){
	              if(s.charAt(0)==" ")
	                  s=s.substring(1,s.length);
	              if(s.charAt(s.length-1)==" ")
	                  s=s.substring(0,s.length-1);

	              if(s.charAt(0)==" "||s.charAt(s.length-1)==" ")
	                  return trim(s);
	          }
	          return s;
	      }

	      $("form").submit(function(){
	          var CZMoney=trim($("#txtCZMoney").val());
	          if(CZMoney==''){
	              $("#tip7").html("<font color='#FF6600'>*&nbsp;&nbsp;请输入充值金额</font>");
	              return false;
	          }else{
	        	  $(this).ajaxSubmit({
	        		  type:'POST',
	        		  url:config.url+'/app.php?act=cashout&uid='+userinfo.uid,
	        		  data:{submit2:'true'},
	        		  success:function(data){
	        			  if(data['status']){
	        				  $.PageDialog.ok('<s></s>'+data['msg']);
	        					var userinfo = getUserinfo();
	        					GetJPData(config.url+'/app.php?act=cashout&uid='+userinfo.uid,{},function(data){
	        						if(data['status']){
	        							//$('.z-Himg img').attr('data-original',config.upload_url+'/'+data['thumb']);
	        							$('.uusername').text(data['username']);
	        							$('.umobile').text('('+data['mobile']+')');
	        							$('.umoney').text('￥'+data['money']);
	        							$('.uscore').text(data['score']);
	        							$('.shourutotal').text(data['shourutotal']);
	        							$('.zhichutotal').text(data['zhichutotal']);
	        							$('.utotal').text(data['utotal']);
	        							$('.cashouthdtotal').text(data['cashouthdtotal']);
	        							$('.cashoutdjtotal').text(data['cashoutdjtotal']);
	        							
	        						}else{
	        							api.alert({msg:data['msg']});
	        						}
	        					});
	        			  }else{
	        				 $.PageDialog.fail(data['msg']);
	        			  }
	        		  },
	        	  });
	          }
	          return false;
	      });

	      //检验汉字
	      function isChinese(s){
	          var patrn = /^\s*[\u4e00-\u9fa5]{1,15}\s*$/;
	          if(!patrn.exec(s)){
	              return false;
	          }
	          return true;
	      }

	      //数字
	      function isNumber(s){
	          var patrn = /^\s*\d+\s*$/;
	          //var patrn1=/^\s*\d{16}[\dxX]{2}\s*$/;
	          if(!patrn.exec(s)){
	              return false;
	          }
	          return true;
	      }
	      //校验手机号码：必须以数字开头
	      function isMobile(s){
	          var patrn=/^13[0-9]{9}$|14[0-9]{9}|15[0-9]{9}$|18[0-9]{9}$/;
	          if(!patrn.exec(s)){
	              return false;
	          }
	          return true;
	      }
	      //检验姓名：姓名是2-15字的汉字
	      function isCardName(s){
	          var patrn = /^\s*[\u4e00-\u9fa5]{1,}[\u4e00-\u9fa5.·]{0,15}[\u4e00-\u9fa5]{1,}\s*$/;
	          if(!patrn.exec(s)){
	              return false;
	          }
	          return true;
	      }
		}else{
			$.PageDialog.fail('请登录用户');
		}
	  });	
};
</script>
</body>
</html>